<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="css/bootstrap.css"/>
		<style>
			body{
				margin: 50px;
				width: 260px;
				color: mediumpurple;
			}
		</style>
		<script src="css/jquery.min.js"></script>
	</head>
	<body>
		<div class="msg"></div>
		<h1>登录</h1>
		<div class="form-group">
			<label for="username">账号:</label>
			<input type="text" class="form-control" id="username"
			placeholder="请输入用户名/邮箱/账号..."
			autofocus="autofocus"
			/>
		</div>
		<div class="form-group">
			<label for="password">密码:</label>
			<input type="password" class="form-control" id="password"
			placeholder="请输入密码..."
			autofocus="autofocus"
			/>
		</div>
		<button class="btn btn-danger"
		onclick="doSubmit()">提交</button>
		<button class="btn btn-group">取消</button>
	</body>
	<script>
		function doSubmit(){
			// var username=document.getElementById("username")
			// console.log(username.value)
			
			console.log($("#username").val())
			
			// var msg = document.getElementsByClassName("msg")[0]
			// console.log(msg.innerText)
			
			console.log($(".msg").text());
			
			// msg.innerText="登录成功，欢迎"+username.value
			// msg.innerHTML="<font color='dodgerblue'>登陆成功，欢迎："+username.value+"</font>"
			$(".msg").text("登录成功，欢迎："+ $("#username").val());
			$(".msg").css("color","red");
		}
		
	</script>
</html>
